import { createRouter, createWebHashHistory } from 'vue-router'
//import Userhome from '../views/userhome.vue'
import Login from '../views/login.vue'
import Select from '../views/select.vue'
//import Adminhome from '../views/adminhome'
const routes = [
  {
    path: '/Userhome',
    name: 'Userhome',
    component:()=>import(/* webpackChunkName: "adminhome" */ '../views/userhome.vue'),
    meta:{
      isShow:false,
    },
    children:[
      {
        path: '/separatehouse',
        name: 'Separatehouse',
        component: () => import(/* webpackChunkName: "separatehouse" */ '../views/separatehouse.vue'),//路由的软加载
        meta:{
          isShow:true,
          title:'分房申请'
        }
      },
      {
        path:'/redistributehou',
        name:'Redistributehou',
        component:()=>import(/* webpackChunkName: "Redistributehou" */'../views/redistributehou'),
        meta:{
          isShow:true,
          title:'调房申请'
        }
      },
      {
        path: '/personal',
        name: 'Personal',
        component: () => import(/* webpackChunkName: "login" */ '../views/personal.vue'),//路由的软加载
        meta:{
          isShow:true,
          title:'退房申请'
        }
      },
      {
        path: '/userteacherList',
        name: 'UserteacherList',
        component: () => import(/* webpackChunkName: "teacherList" */ '../views/userteacherList.vue'),//路由的软加载
        meta:{
          isShow:true,
          title:'分房阈值查询'
        }
      },
      {
        path:'/ugethouse',
        name:'Ugethouse',
        component:()=>import(/* webpackChunkName: "ugethouse" */ '../views/ugethouse.vue'),
        meta:{
          isShow:true,
          title:'查看分房结果'
        },
      },
      {
        path:'/upropertylist',
        name:'Upropertylist.',
        component: ()=>import(/* webpackChunkName: "propertylist" */'../views/upropertylist.vue'),
        meta:{
          isShow:true,
          title:'房租查询'
        }
      },
    ]
  },
  {
    path:'/',
    name:'Select',
    component:Select,
    meta:{
      isShow:false,
    }

  },
  {
    path: '/Login',
    name: 'Login',
    component:Login,
    meta:{
      isShow:false,
    }
   // component: () => import(/* webpackChunkName: "login" */ '../views/login.vue')//路由的软加载
  },
  {
    path:'/adminhome',
    name:'Adminhome',
    component:()=>import(/* webpackChunkName: "adminhome" */ '../views/adminhome.vue'),
    meta:{
      isShow:false,
    },
    children:[
      {
        path: '/teacherList',
        name: 'TeacherList',
        component: () => import(/* webpackChunkName: "teacherList" */ '../views/teacherList.vue'),//路由的软加载
        meta:{
          isShow:true,
          title:'住房标准表'
        }
      },
      {
        path:'/propertylist',
        name:'Propertylist',
        component: ()=>import(/* webpackChunkName: "propertylist" */'../views/propertylist.vue'),
        meta:{
          isShow:true,
          title:'房产表'
        }
      },
      {
        path:'/distriproperty',
        name:'Distriproperty',
        component:()=>import(/* webpackChunkName: "distriproperty" */'../views/distriproperty.vue'),
        meta:{
          isShow:true,
          title:'月底分房'
        }
      },
    ]
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
